package cn.quickotp.mod.item;

// 基础包
import java.util.Iterator;
// 游戏包
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
// fabric包
// 自写包
import cn.quickotp.mod.item.enchant.EnchantRegister;

public class ItemRegister {
    // 附魔书注册
    private static EnchantRegister enchantR = new EnchantRegister();
    public void init(){
        registerEnchant();
    }
    // 附魔书初始化
    public void registerEnchant(){
        Iterator<String> it = enchantR.IteratorInMap();
        while (it.hasNext()) {
            String enchantName = it.next();
            Registry.register(
                Registry.ENCHANTMENT, 
                new Identifier("codeworld", enchantName),
                    enchantR.eMap.get(enchantName)
            );
        }
    }
}
